package algorithm.common;



import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;
import java.util.TreeMap;


/**
 * @Author: Hevery
 * @Description:
 * @Date: Created on 2017/9/8
 * @Modified By:
 */
public class Main1 {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        Map<Integer,Integer> map = new HashMap<>();
        for(int i=0;i<n;i++){
            int m = scan.nextInt();
            if(map.get(m) == null){
                map.put(m,1);
            }else{
                map.put(m,map.get(m)+1);
            }
        }
        System.out.println("map"+"----"+map.size());
        int count = 0;
        for(Integer i : map.keySet()){
            if(i == 0){
                count += map.get(i);
            }else{
                count += map.get(i)/2;
            }
        }
        System.out.println(count);
    }
}
